package edu.ynmd.bmi.dao;

import edu.ynmd.bmi.model.City;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface CityDao extends JpaRepository<City,String> {

    @Query("select c from City c where c.code =:citycode")
    public List<City> getCityByCode(@Param("citycode")String citycode);


    List<City> getCitiesByCode(String cotycode);
}
